package com.multithreading.Thread_003;

import java.util.concurrent.Callable;

/**
 * @author zx
 * @version 1.0
 * @package_name: com.multithreading.Thread_003
 * @date 2024/5/13 17:49
 */
public class MyCallable implements Callable<Integer> {
    @Override
    public Integer call() throws Exception {
        int sum = 0;
        for (int i = 0; i <= 100; i++) {
            System.out.println(Thread.currentThread().getName() + ":" + i);
            sum += i;
        }
        return sum;
    }
}
